package com.xiaoxi.exam.service;

import com.xiaoxi.exam.dao.BannerMapper;
import com.xiaoxi.exam.model.Banner;
import com.xiaoxi.exam.model.BannerExample;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BannerService {

  @Autowired
  private BannerMapper bannerMapper;


  public List<Banner> getBanners() {
    BannerExample example = new BannerExample();
    example.or().andDeletedAtIsNull();
    example.setOrderByClause("sort asc");
    return bannerMapper.selectByExample(example);
  }
}
